package com.threadmethod.AtomicIntegerFieldUpdater;

/**
 * @PackageName:com.threadmethod.AtomicIntegerFieldUpdater
 * @ClassName:Test
 * @Description:
 * @Author: zhangxiaoyu
 * @date 2020/12/22 17:04
 */
public class Test {

    public static void main(String[] args){
         User user = new User(1234,10);
         //开启10个线程
         for (int i=0;i<10;i++){
             new SubThread(user).start();
         }

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println(user);
    }
}
